package ch1;

public class SchoolTest2 {

	public static void main(String[] args) {
		School hongYangMuxiao = new School();// 实例化
		// 给属性赋值
		hongYangMuxiao.name = "合肥工大大学";
		hongYangMuxiao.addr = "屯溪路179号";
		hongYangMuxiao.students = 23000;
		hongYangMuxiao.teachers = 7000;
		hongYangMuxiao.show();

		School pengfeiMuixao = hongYangMuxiao;// 赋值的是地址
		System.out.println("梁宏洋母校的情况如下：");
		hongYangMuxiao.show();
		System.out.println("张鹏飞母校情况如下：");
		pengfeiMuixao.show();
		System.out.println("梁宏洋发现，母校扩招了。。。");
		pengfeiMuixao.students += 1300;
		System.out.println("梁宏洋母校的情况如下：");
		hongYangMuxiao.show();
		System.out.println("张鹏飞母校情况如下：");
		pengfeiMuixao.show();
		System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.");
		System.out.println("梁宏洋背叛了母校。。。");
		// hongYangMuxiao = null;
		// // hongYangMuxiao.show();
		// pengfeiMuixao.show();// 异常
	}

}
